package com.devlib.filetool;

import java.io.File;

/**
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
 * Description: 
 * Author: Heller (HellerSong@outlook.com)
 * CreationTime: Mar 24, 2015
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
 **/
public class DirOM {
	
	public static String GetParrentDirectory(String path)
    {
        //StrCheck.CheckChainDirIllegal(path);
		
        return (new File(path)).getParent();
    }
//    public static String GetParrentDirectory(String path, int recursionIndex)
//    {
//        StrCheck.CheckChainDirIllegal(path);
//
//        if (recursionIndex < 0)
//        {
//            Console.WriteLine("Recursion Index shoulc >= 0");
//            return null;
//        }
//
//        if (recursionIndex == 0)
//            return path;
//        else
//            return GetParrentDirectory(Directory.GetParent(path).ToString(), recursionIndex - 1);
//    }
		
}
